import request from '@/utils/axios'

/**
 * @param {Object} id
 * @param {Object} status更改notice状态
 */
export function changeNoticeStatus(id, status) {
  const data = {
    id,
    status
  }
  return request({
    url: '/system/notice/changeStatus',
    method: 'put',
    data
  })
}

// 新增公告
export function addNotice(data) {
  return request({
    url: '/system/notice',
    method: 'post',
    data
  })
}

// 编辑公告
export function updateNotice(data) {
  return request({
    url: '/system/notice',
    method: 'put',
    data
  })
}

